Beta

AI Personalization is now available in public beta. Migrate now to personalize search results based on historical and predictive user affinities.

Gathering user data

The first step to an effective Personalization implementation is gathering the right data about your users. When your users engage in specific behaviors, you need to send Algolia events describing these behaviors. Algolia then uses these events to build individual user affinity profiles. Before beginning to send events, it’s best to analyze which behaviors your users take and creating a plan for the corresponding events you’ll send.

User behaviors are meaningful for your objectives

Events capture all necessary information

  • All your events include a unique userToken for the user engaging in the behavior.
  • You are using view, click, and conversion events for the appropriate behavior.
  • All your events include a valid eventName.
  • All your events include the index name where you’ve declared the applicable facets as attributesForFaceting.
  • If you’re sending events related to a search, you’ve included the queryID.
  • If you’re sending item-based events, you’ve included the relevant objectID.
  • If you’re sending category or filter-based events, you’ve included the relevant filters.
  • Optional but recommended: you’ve included the timestamp for when the behavior occurred.

For more information, see the Insights API reference.

You can use the Insights log debugger in your dashboard to monitor the received events and ensure that none of them are missing fields or returning errors.

Configuring your Personalization strategy

The Personalization strategy drives how Algolia computes user affinity profiles using the events you sent. You can configure the Personalization strategy directly from your Algolia dashboard or using an API client. However, you should use the dashboard since it provides a visual simulator to explain your strategy’s effects.

Personalization strategy

Strategy simulation

You’ve used the simulator in the dashboard’s Personalization section to simulate your strategy for various users and queries. The personalized results are as you would expect.

Enabling personalization on searches

Personalized searches build on a user’s affinity profile to boost search results related to their preferences. It’s best to use the API clients or InstantSearch to perform searches.

enablePersonalization and userToken are set in your search requests

  • You’ve set enablePersonalization to true either as a search parameter or in the index configuration.
  • You’re using consistent user tokens in events and searches. To have personalized results, you must use the same 'userToken for the events you send for a particular user and the searches that user makes.

If you haven’t sent events for a particular user token in the last 90 days, Algolia doesn’t personalize that user’s results.

Next steps

Before enabling Personalization for all your users, it’s best to A/B test your Personalization implementation first.

Further reading